home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Cmp(V1.3 ARP Only)
-
-
- NAME
- Cmp - Compare files and report differences.
-
- SYNOPSIS
- Cmp From With FULL QUICK ALL
-
- DESCRIPTION
- Use Cmp to display differences between binary or text
- files. When comparing single files, the return code will
- be set to WARN if the files do not match. This is useful
- in scripts with IF statements. The return code on
- complex pattern matches with more than one file will
- always be zero. When specifying directories as either the
- From or With arguments, you may use a dot which means
- "current directory".
-
- You can use either C-e (Control E) or C-f (Control F)
- to abort the comparison of the current files and move on
- to the next. This is most useful with multiple input
- files and the FULL (see below) option. As usual, a C-c
- (Control C) will abort the program all together.
-
- INPUT FILES
- You can specify the file or files to be compared
- quite easily and naturally with Cmp using simple
- pathnames or wildcard patterns or even directory names.
- When you specify wildcards and/or directories to be
- compared, Cmp will compare files with the same names in
- each directory. Cmp will not abort if it cannot find the
- second file, it will simply print an informative message
- and go on to the next file. If you need to compare files
- with different names, then you must specify each name in
- full as the With name and the From name. A more detailed
- explanation follows:
-
- If From is a file, then With may be either a
- directory or another file. If a directory is supplied,
- then Cmp looks for a file with the same name as the From
- file in that directory:
-
- So, to a compare File with RAD:Dir/File2
-
- Cmp File RAD:dir/File2
-
-
- And to compare File with DirName/File
-
- Cmp File DirName
-
-
- You may also use a wildcard pattern as the From file.
- In this case, the With name must be a directory. Cmp
- expands the wildcard specification and tries to find
- files with that name in the With directory:
-
- Cmp File RAD:Foo/$?.c DF0:c
-
-
- Finally, you can also use two directory names as the
- From and With specification. This will compare all the
- files of the same name in the From directory with all the
- files of the same name in the With directory:
-
- Cmp Dir1 Dir2
-
-
- OPTIONS
- FULL
- This will display all points at which the two files
- differ. The display is of the form "Offset: Byte1 Byte2"
- where Offset is in decimal and Byte1 Byte2 are in hex.
- Use C-e or C-f to move to the next file in the series, or
- C-c to abort.
-
- QUICK
- The QUICK option will check to see if the two files
- appear to be identical, by first comparing the date
- stamps and file lengths, and if these are the same the
- file comparison is skipped saving some time.
-
- ALL
- If there are subdirectories within the directories
- you are comparing, the ALL switch will force Cmp to
- recursively descend these directories, comparing files as
- appropriate.
-
- NOTE
- This command is new with V1.3 of ARP, it is not
- available with the Commodore distribution.
-